home *** CD-ROM | disk | FTP | other *** search
/ Champak 86 / (Vol 86) My Disc.iso / Games / restaurante_1072.swf / scripts / __Packages / Kitchen.as < prev    next >
Text File  |  2009-04-16  |  6KB  |  165 lines

  1. if(true)
  2. {
  3.    if(true)
  4.    {
  5.       ┬º┬ºpush(false);
  6.    }
  7.    if(!┬º┬ºpop())
  8.    {
  9.       if(true)
  10.       {
  11.          if(true)
  12.          {
  13.             ┬º┬ºpush(false);
  14.          }
  15.          if(!┬º┬ºpop())
  16.          {
  17.             if(!_global.Kitchen)
  18.             {
  19.                _global.Kitchen extends MissionItem;
  20.                var _loc2_ = _global.Kitchen = function($mc, $data)
  21.                {
  22.                   super($mc);
  23.                   this.chef = this.__get__mc()[$data.chefName];
  24.                   this.menuList = [];
  25.                   this.foodList = [];
  26.                   this.__set__status(Kitchen.REST);
  27.                }.prototype;
  28.                _loc2_.busyHandle = function()
  29.                {
  30.                   this.chef.gotoAndStop(Kitchen.BUSY);
  31.                };
  32.                _loc2_.restHandle = function()
  33.                {
  34.                   this.chef.gotoAndStop(Kitchen.REST);
  35.                };
  36.                _loc2_.addMenu = function(t)
  37.                {
  38.                   this.menuList.push(t);
  39.                   this.cook();
  40.                };
  41.                _loc2_.tableCustomerAngry = function(t)
  42.                {
  43.                   var _loc2_ = 0;
  44.                   while(_loc2_ < this.foodList.length)
  45.                   {
  46.                      var _loc3_ = Food(this.foodList[_loc2_]);
  47.                      if(_loc3_.__get__table() == t)
  48.                      {
  49.                         _loc3_.__get__mc().removeMovieClip();
  50.                         false;
  51.                         this.foodList.splice(_loc2_,1);
  52.                         break;
  53.                      }
  54.                      _loc2_ = _loc2_ + 1;
  55.                   }
  56.                   _loc2_ = 0;
  57.                   while(_loc2_ < this.menuList.length)
  58.                   {
  59.                      if(t == this.menuList[_loc2_])
  60.                      {
  61.                         this.menuList.splice(_loc2_,1);
  62.                         this.cook();
  63.                         break;
  64.                      }
  65.                      _loc2_ = _loc2_ + 1;
  66.                   }
  67.                };
  68.                _loc2_.getFood = function(food)
  69.                {
  70.                   var _loc2_ = 0;
  71.                   while(_loc2_ < this.foodList.length)
  72.                   {
  73.                      if(food == this.foodList[_loc2_])
  74.                      {
  75.                         this.foodList.splice(_loc2_,1);
  76.                         this.refresh();
  77.                         break;
  78.                      }
  79.                      _loc2_ = _loc2_ + 1;
  80.                   }
  81.                   return food;
  82.                };
  83.                _loc2_.cook = function()
  84.                {
  85.                   if(this.isBusy())
  86.                   {
  87.                      return undefined;
  88.                   }
  89.                   this.__set__status(Kitchen.BUSY);
  90.                   var t = Table(this.menuList.shift());
  91.                   var obj = this;
  92.                   var interval = setInterval(function()
  93.                   {
  94.                      obj.createFood(t);
  95.                      clearInterval(interval);
  96.                   }
  97.                   ,this.cookDelay);
  98.                };
  99.                _loc2_.isBusy = function()
  100.                {
  101.                   return this._status == Kitchen.BUSY;
  102.                };
  103.                _loc2_.createFood = function(t)
  104.                {
  105.                   if(t.__get__isNotFull() || t.__get__customerLeave())
  106.                   {
  107.                      this.__set__status(Kitchen.REST);
  108.                      if(this.menuList.length > 0)
  109.                      {
  110.                         this.cook();
  111.                      }
  112.                      return undefined;
  113.                   }
  114.                   var _loc3_ = new Food(this.__get__mc().attachMovie(MissionData.DATA[Mission.getMission().__get__id()].food.linkName,"food" + getTimer(),this.__get__mc().getNextHighestDepth()),t);
  115.                   this.foodList.unshift(_loc3_);
  116.                   this.refresh();
  117.                   var _loc2_ = new Sound();
  118.                   _loc2_.attachSound("Ling");
  119.                   _loc2_.start();
  120.                   this.__set__status(Kitchen.REST);
  121.                   if(this.menuList.length > 0)
  122.                   {
  123.                      this.cook();
  124.                   }
  125.                   return _loc3_;
  126.                };
  127.                _loc2_.refresh = function()
  128.                {
  129.                   var _loc2_ = 0;
  130.                   while(_loc2_ < this.foodList.length)
  131.                   {
  132.                      Food(this.foodList[_loc2_]).__get__mc().swapDepths(_loc2_);
  133.                      _loc2_ = _loc2_ + 1;
  134.                   }
  135.                };
  136.                _global.Kitchen = function($mc, $data)
  137.                {
  138.                   super($mc);
  139.                   this.chef = this.__get__mc()[$data.chefName];
  140.                   this.menuList = [];
  141.                   this.foodList = [];
  142.                   this.__set__status(Kitchen.REST);
  143.                }.BUSY = "busy";
  144.                _global.Kitchen = function($mc, $data)
  145.                {
  146.                   super($mc);
  147.                   this.chef = this.__get__mc()[$data.chefName];
  148.                   this.menuList = [];
  149.                   this.foodList = [];
  150.                   this.__set__status(Kitchen.REST);
  151.                }.REST = "rest";
  152.                _loc2_.cookDelay = 3000;
  153.                ┬º┬ºpush(ASSetPropFlags(_global.Kitchen.prototype,null,1));
  154.             }
  155.             ┬º┬ºpop();
  156.          }
  157.       }
  158.       ┬º┬ºgoto(addr441);
  159.    }
  160.    ┬º┬ºpush(function ┬º\x1b∩┐╜\x02┬º(┬º∩┐╜\x07┬º, ┬º\x01┬º, ┬º\x02\x01┬º, ┬º\x01┬º, ┬º∩┐╜∩┐╜\x1b\x02∩┐╜\x15\x029┬º, _global, Kitchen, chef, __get__mc, chefName, menuList, foodList, REST, __set__status)
  161.    {
  162.    } lt ┬º┬ºpop());
  163. }
  164. addr441:
  165.